﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;

namespace LIMS.Entities
{
    [ActiveRecord(Lazy = true)]
    [Serializable]
    public class User : ActiveRecordBase // : BaseEntity<int>
    {
      
        public User() { }

        #region Private
        private int id;
        private string userName;
        private string firstName;
        private string lastName;
        private string password;
        private string email;
        private string designation;
        private string description;
        private string status = "X";
        private int displayOrder;
        private DateTime createdDateTime;
        private DateTime? lastModifiedDateTime;
        private int createdBy;
        private int lastModifiedBy;
        private string lastLoginIP;
        private string resetPasswordHash;
        private DateTime? lastLoginDateTime;
        private DateTime? resetPasswordDateTime;
        private int country;
        private int usertype = 0;
        private string department_id = string.Empty;
        private int parentId;
        private string employee_code = string.Empty;
        private DateTime? dob;

        private IList<GroupUserLink> groupLinks = new List<GroupUserLink>();

        #endregion

        #region public
        [PrimaryKey(PrimaryKeyType.Increment)] 
        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }
        public virtual  string FirstName
        {
            get { return firstName; }
            set { firstName = value; }
        }


        public virtual string LastName
        {
            get { return lastName; }
            set { lastName = value; }
        }
        public virtual string Password
        {
            get { return password; }
            set { password = value; }
        }

        public virtual string Email
        {
            get { return email; }
            set { email = value; }
        }

        public virtual  string Designation
        {
            get { return designation; }
            set { designation = value; }
        }

        public virtual  string Description
        {
            get { return description; }
            set { description = value; }
        }

        public virtual string Status
        {
            get { return status; }
            set { status = value; }
        }

        public virtual int Country
        {
            get { return country; }
            set { country = value; }
        }


        public virtual  int DisplayOrder
        {
            get { return displayOrder; }
            set { displayOrder = value; }
        }


        public virtual  DateTime CreatedDateTime
        {
            get { return createdDateTime; }
            set { createdDateTime = value; }
        }


        public virtual  DateTime? LastModifiedDateTime
        {
            get { return lastModifiedDateTime; }
            set { lastModifiedDateTime = value; }
        }

        public virtual  int CreatedBy
        {
            get { return createdBy; }
            set { createdBy = value; }
        }

        public virtual  string UserName
        {
            get { return userName; }
            set { userName = value; }
        }

        public virtual  int LastModifiedBy
        {
            get { return lastModifiedBy; }
            set { lastModifiedBy = value; }
        }

        public virtual IList<GroupUserLink> GroupLinks
        {
            get { return groupLinks; }
            set { groupLinks = value; }
        }

        public virtual string LastLoginIP
        {
            get { return lastLoginIP; }
            set { lastLoginIP = value; }
        }

         public virtual string ResetPasswordHash
        {
            get { return resetPasswordHash; }
            set { resetPasswordHash = value; }
        }


         public virtual string DepartmentId
         {
             get { return department_id; }
             set { department_id = value; }
         }

         public virtual int UserType
         {
             get { return usertype; }
             set { usertype = value; }
         }

          public virtual DateTime? LastLoginDateTime
        {
            get { return lastLoginDateTime; }
            set { lastLoginDateTime = value; }
        }

          public virtual DateTime? ResetPasswordDateTime
        {
            get { return resetPasswordDateTime; }
            set { resetPasswordDateTime = value; }
        }
          public virtual int ParentId
          {
              get { return parentId; }
              set { parentId = value; }
          }
          public virtual string EmployeeCode
          {
              get { return employee_code; }
              set { employee_code = value; }
          }
          public virtual DateTime? UserDOB
          {
              get { return dob; }
              set { dob = value; }
          }

        #endregion
    }
}


